package aaa.service;
/*
@Date:2025/6/12
*/

import aaa.dao.BookMapper;
import aaa.pojo.Books;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("bookService")
public class BookServiceImpl implements BookService{

   @Autowired
    private BookMapper bookMapper;

    @Override
    public int addbook(Books books) {
        return bookMapper.addbook(books);
    }

    @Override
    public int deletebook(int id) {
        return bookMapper.deletebook(id);

    }

    @Override
    public int updatebook(Books books) {
        return bookMapper.updatebook(books);
    }

    @Override
    public Books findbook(int id) {
        return bookMapper.findbook(id);
    }

    @Override
    public List<Books> findall() {
        return bookMapper.findall();
    }

    public void setBookMapper(BookMapper bookMapper) {
        this.bookMapper = bookMapper;
    }
}
